/*
 * Wire
 * Copyright (C) 2018 Wire Swiss GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

// Variables
@image-size: 104px;
@image-items-per-row: 6;

@max-section-width: 696px;

.collection-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 64px;
  padding-top: 24px;
}

// Sections
.collection-section {
  display: inline-block;
  max-width: @max-section-width;

  > header {
    align-items: center;
    display: flex;
    height: 24px;
    margin-bottom: 8px;
  }

  & + & {
    margin-top: 32px;
  }
}

.collection-date-separator {
  .label-bold-xs;
  align-items: center;
  display: flex;
  height: 24px;
  margin-bottom: 8px;
  width: 100%;

  &:not(:first-of-type) {
    margin-top: 32px;
  }
}

.collection-header-icon {
  color: @graphite;
  text-align: center;
  width: @conversation-message-sender-width;
}

.collection-header-all {
  .font-size-xs;
  .cursor-pointer;
  font-weight: @font-weight-bold;
  margin-right: 0;
  margin-left: auto;
}

// Images
.collection-images {
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  margin-left: @conversation-message-sender-width;
  width: @image-size * @image-items-per-row;
}

.collection-image {
  .square(@image-size);
  outline: 1px solid #fff;
}

// Files
.collection-file {
  width: 100%;
}

// Videos
.collection-video {
  flex: 1 1 auto;
  height: @image-size;
  outline: 1px solid #fff;
}

// Links
.collection-link {
  margin-left: @conversation-message-sender-width;
}

// Details
.collection-details-header {
  align-items: center;
  display: flex;
  height: 24px;
  margin-bottom: 8px;
  margin-top: 24px;
  width: 100%;
}
